package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @Author:FangZhiyi
 * @Description
 * @Data Created in 2020/7/23 18:06
 * @Moddified By:
 */
@Entity
@Table(name = "follow_up_route_detail")
public class FollowUpRouteDetail {
    private Long routeDetailId;
    private Long routeId;
    private String routeName;
    private String organizationId;
    //路径详细类型，1门诊复诊2入组评估3问卷随访4指标检测5医护随访6健康宣教7健康监测
    private Byte routeDetailType;
    private String medicalRecordId;
    private String medicalRecordName;
    private Byte timeNodeType;
    private Integer timeNodeSize;
    private Byte timeNodeSizeUnit;
    private Byte followUpFrequency;
    private Byte followUpFrequencyTime;
    private Integer followUpFrequencyNumber;
    private Byte isNotify;
    private Byte notifyDate;
    //循环执行属性    0 :不执行  1 :执行
    private Byte isLoopExecute;
    //随访实际执行时间调整下次计划时间 0 未勾选 1 勾选
    private Byte followUpPlanFlag;
    //随访阶段序号1
    private Integer followUpStageFirstSeq;
    //随访阶段序号1
    private Integer followUpStageSecondSeq;
    //随访阶段名称
    private String followUpStageName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date gmtCreate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date gmtModified;

	@Id
	@Column(name = "route_detail_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getRouteDetailId() {
		return routeDetailId;
	}

	public void setRouteDetailId(Long routeDetailId) {
		this.routeDetailId = routeDetailId;
	}

	@Basic
	@Column(name = "route_id")
	public Long getRouteId() {
		return routeId;
	}

    public void setRouteId(Long routeId) {
        this.routeId = routeId;
    }

    @Basic
    @Column(name = "route_name")
    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    @Basic
    @Column(name = "organization_id")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @Basic
    @Column(name = "route_detail_type")
    public Byte getRouteDetailType() {
        return routeDetailType;
    }

    public void setRouteDetailType(Byte routeDetailType) {
        this.routeDetailType = routeDetailType;
    }

    @Basic
    @Column(name = "medical_record_id")
    public String getMedicalRecordId() {
        return medicalRecordId;
    }

    public void setMedicalRecordId(String medicalRecordId) {
        this.medicalRecordId = medicalRecordId;
    }

    @Basic
    @Column(name = "medical_record_name")
    public String getMedicalRecordName() {
        return medicalRecordName;
    }

    public void setMedicalRecordName(String medicalRecordName) {
        this.medicalRecordName = medicalRecordName;
    }

    @Basic
    @Column(name = "time_node_type")
    public Byte getTimeNodeType() {
        return timeNodeType;
    }

    public void setTimeNodeType(Byte timeNodeType) {
        this.timeNodeType = timeNodeType;
    }

    @Basic
    @Column(name = "time_node_size")
    public Integer getTimeNodeSize() {
        return timeNodeSize;
    }

    public void setTimeNodeSize(Integer timeNodeSize) {
        this.timeNodeSize = timeNodeSize;
    }

    @Basic
    @Column(name = "time_node_size_unit")
    public Byte getTimeNodeSizeUnit() {
        return timeNodeSizeUnit;
    }

    public void setTimeNodeSizeUnit(Byte timeNodeSizeUnit) {
        this.timeNodeSizeUnit = timeNodeSizeUnit;
    }

    @Basic
    @Column(name = "follow_up_frequency")
    public Byte getFollowUpFrequency() {
        return followUpFrequency;
    }

    public void setFollowUpFrequency(Byte followUpFrequency) {
        this.followUpFrequency = followUpFrequency;
    }

    @Basic
    @Column(name = "follow_up_frequency_time")
    public Byte getFollowUpFrequencyTime() {
        return followUpFrequencyTime;
    }

    public void setFollowUpFrequencyTime(Byte followUpFrequencyTime) {
        this.followUpFrequencyTime = followUpFrequencyTime;
    }

    @Basic
    @Column(name = "follow_up_frequency_number")
    public Integer getFollowUpFrequencyNumber() {
        return followUpFrequencyNumber;
    }

    public void setFollowUpFrequencyNumber(Integer followUpFrequencyNumber) {
        this.followUpFrequencyNumber = followUpFrequencyNumber;
    }

    @Basic
    @Column(name = "is_notify")
    public Byte getIsNotify() {
        return isNotify;
    }

    public void setIsNotify(Byte isNotify) {
        this.isNotify = isNotify;
    }

    @Basic
    @Column(name = "notify_date")
    public Byte getNotifyDate() {
        return notifyDate;
    }

    public void setNotifyDate(Byte notifyDate) {
        this.notifyDate = notifyDate;
    }

	@Basic
	@Column(name = "gmt_create")
	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	@Basic
	@Column(name = "gmt_modified")
	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

    @Basic
    @Column(name = "is_loop_execute")
    public Byte getIsLoopExecute() {
        return isLoopExecute;
    }

    public void setIsLoopExecute(Byte isLoopExecute) {
        this.isLoopExecute = isLoopExecute;
    }
    @Basic
    @Column(name = "follow_up_plan_flag")
    public Byte getFollowUpPlanFlag() {
        return followUpPlanFlag;
    }

    public void setFollowUpPlanFlag(Byte followUpPlanFlag) {
        this.followUpPlanFlag = followUpPlanFlag;
    }
    @Basic
    @Column(name = "follow_up_stage_first_seq")
    public Integer getFollowUpStageFirstSeq() {
        return followUpStageFirstSeq;
    }

    public void setFollowUpStageFirstSeq(Integer followUpStageFirstSeq) {
        this.followUpStageFirstSeq = followUpStageFirstSeq;
    }
    @Basic
    @Column(name = "follow_up_stage_second_seq")
    public Integer getFollowUpStageSecondSeq() {
        return followUpStageSecondSeq;
    }

    public void setFollowUpStageSecondSeq(Integer followUpStageSecondSeq) {
        this.followUpStageSecondSeq = followUpStageSecondSeq;
    }
    @Basic
    @Column(name = "follow_up_stage_name")
    public String getFollowUpStageName() {
        return followUpStageName;
    }

    public void setFollowUpStageName(String followUpStageName) {
        this.followUpStageName = followUpStageName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FollowUpRouteDetail that = (FollowUpRouteDetail) o;
        return routeDetailId.equals(that.routeDetailId) &&
                Objects.equals(routeId, that.routeId) &&
                Objects.equals(routeName, that.routeName) &&
                Objects.equals(organizationId, that.organizationId) &&
                Objects.equals(routeDetailType, that.routeDetailType) &&
                Objects.equals(medicalRecordId, that.medicalRecordId) &&
                Objects.equals(medicalRecordName, that.medicalRecordName) &&
                Objects.equals(timeNodeType, that.timeNodeType) &&
                Objects.equals(timeNodeSize, that.timeNodeSize) &&
                Objects.equals(timeNodeSizeUnit, that.timeNodeSizeUnit) &&
                Objects.equals(followUpFrequency, that.followUpFrequency) &&
                Objects.equals(followUpFrequencyTime, that.followUpFrequencyTime) &&
                Objects.equals(followUpFrequencyNumber, that.followUpFrequencyNumber) &&
                Objects.equals(isNotify, that.isNotify) &&
                Objects.equals(notifyDate, that.notifyDate) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(routeDetailId, routeId, routeName, organizationId, routeDetailType, medicalRecordId, medicalRecordName, timeNodeType, timeNodeSize, timeNodeSizeUnit, followUpFrequency, followUpFrequencyTime, followUpFrequencyNumber, isNotify, notifyDate, gmtCreate, gmtModified);
    }
}
